﻿using CityDashboard.Models;
using System;
using System.Collections.Generic;
using System.Text;
using Windows.UI;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Media;

namespace CityDashboard.Converters
{
    public class HoSoDangGiaiQuyetToBrushConverter:IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            HoSoDangGiaiQuyet hoSo = value as HoSoDangGiaiQuyet;
            if (hoSo == null)
                return null;
            if(hoSo.TypeTtrang==1)
            {
                return new SolidColorBrush(Color.FromArgb(255, 158, 28, 31));
            }
            else
            {
                return new SolidColorBrush(Color.FromArgb(255, 225, 186, 35));
            }
            return null;
        }

        public object ConvertBack(object value, Type targetType, object parameter, string language)
        {
            throw new NotImplementedException();
        }
    }
}
